package org.luxor.commons.zookeeper.globallock;

import org.luxor.commons.zookeeper.annotation.GlobalLock;
import org.springframework.stereotype.Service;

@Service
public class LockAnnotationService {
    public static int count;

    @GlobalLock(keys = "#name")
    public void simple(String name) {
        count++;
        System.out.println("[" + count + "]执行简单方法2 , 当前线程:" + Thread.currentThread().getName());
    }
}
